package cn.istartfinancial.entity;


import cn.istartfinancial.annotation.group.AddGroup;
import cn.istartfinancial.annotation.group.UpdateGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotEmpty;
import java.util.Date;

/**
 * @author: Nzp
 * @date: 2018/8/22
 * @description: 角色实体
 */
@Data
@EqualsAndHashCode
@Table(name = "sys_role")
public class SysRole
{
    @Id
    @GeneratedValue(generator = "JDBC")
    private String id;

    @NotEmpty(message = "角色名称不能为空", groups = {AddGroup.class, UpdateGroup.class})
    @Column(name = "role_name")
    private String roleName;

    private String remark;

    @Column(name = "create_by")
    private String createBy;

    @Column(name = "create_date")
    private Date createDate;

    @Column(name = "update_by")
    private String updateBy;

    @Column(name = "update_date")
    private Date updateDate;
}